//
//  MNDTenderProjectCell.m
//  PlusTenderDemo
//
//  Created by Vitas on 2018/7/18.
//  Copyright © 2018年 Bylongma. All rights reserved.
//

#import "MNDTenderProjectCell.h"

@implementation MNDTenderProjectCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(MNDPlusBorrowProjectModel *)model {
    _model = model;
    self.titleLabel.text = model.borrow_title;
    self.moneyLabel.text = model.tender_money;
    self.earnLabel.text = model.expect_income;
    if (model.borrow_coupon_apr.floatValue > 0) {
        self.yearAprLabel.text = [NSString stringWithFormat:@"%@+%@%%",model.borrow_year_apr,model.borrow_coupon_apr];
    }else {
        self.yearAprLabel.text = [NSString stringWithFormat:@"%@%%",model.borrow_year_apr];
    }
    self.deadLineLabel.text = [NSString stringWithFormat:@"%@个月",model.borrow_deadline];
    if (model.is_return.integerValue == 1) {
        self.returnLabel.text = @"已还款";
        self.protocolLabel.hidden = YES;
        self.arrowImageView.hidden = YES;
    }else {
        self.returnLabel.text = @"收益中";
        self.protocolLabel.hidden = NO;
        self.arrowImageView.hidden = NO;
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
